function SupType(name){
	this.name=name;
	this.colors=["red","green"];
}
SupType.prototype.sayName=function(){
	console.log(this.name);
}
function SubType(name,age){

	SupType.call(this,name);
	this.age=age;
}
SubType.prototype=new SupType();


var sub1=new SupType("john",100);
sub1.colors.push("black");
//console.log(sub1.name);
sub1.sayName();
console.log(sub1.colors);
var sub2=new SupType("tom",23);
console.log(sub2.colors);
sub2.sayName();